﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>多编辑器示例</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="Stylesheet" href="demo.css" />
    <link type="text/css" rel="stylesheet" href="zyoffice/js/skygqbox.css" />
    <script type="text/javascript" src="zyoffice/js/jquery-1.4.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="zyoffice/js/skygqbox.js" charset="utf-8"></script>
    <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
    <script type="text/javascript" src="zyoffice/js/w.js" charset="utf-8"></script>
    <script type="text/javascript" src="demo.js" charset="utf-8"></script>
</head>
<body>	
    <div id="demos"></div>    
	<textarea id="txtContent1" name="txtContent1" cols="1" rows="1"></textarea>
	<textarea id="txtContent" name="txtContent" cols="1" rows="1"></textarea>
	<!--创建FCKEditor控件-->
	<script language="javascript" type="text/javascript">
        zyOffice.getInstance({
            word:"http://localhost:13710/zyoffice/word/convert",
			wordExport:"http://localhost:13710/zyoffice/word/export",
            pdf:"http://localhost:13710/zyoffice/pdf/upload"            
        });//加载控件

		var oFCKeditor = new FCKeditor('txtContent');
		oFCKeditor.BasePath = "fckeditor/";
		//oFCKeditor.ToolbarSet = "Basic";
		oFCKeditor.Height = 300;
		oFCKeditor.Value = '';
		oFCKeditor.ReplaceTextarea();

		var editor1 = new FCKeditor('txtContent1');
		editor1.BasePath = "fckeditor/";
		//oFCKeditor.ToolbarSet = "Basic";
		editor1.Height = 300;
		editor1.Value = '';
		editor1.ReplaceTextarea();

		//初始化编辑器
		function FCKeditor_OnComplete(editorInstance)
		{
            zyOffice.getInstance().SetEditor(editorInstance);
			editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;//挂载编辑器激活事件
		}
		
		function FCKeditor_OnFocus( editorInstance )
		{
            zyOffice.getInstance().SetEditor(editorInstance);//设置当前拥有焦点的编辑器
		}
	</script>
</body>
</html>